<?php if (!defined('THINK_PATH')) exit(); /*a:5:{s:67:"E:\www\paobanglang\nav/../application/admin\view\order\setting.html";i:1507511978;s:63:"E:\www\paobanglang\nav/../application/admin\view\Main\menu.html";i:1514443605;s:67:"E:\www\paobanglang\nav/../application/admin\view\Public\header.html";i:1512184095;s:70:"E:\www\paobanglang\nav/../application/admin\view\Main\menu_footer.html";i:1510984673;s:67:"E:\www\paobanglang\nav/../application/admin\view\Public\footer.html";i:1516863870;}*/ ?>
﻿<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>后台管理</title>
   
    <link rel="stylesheet" href="__STATIC__/admin/css/amazeui.min.css" />
    <link rel="stylesheet" href="__STATIC__/admin/css/admin.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/style.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/pintuer.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/app.css">
    <script src="__STATIC__/admin/js/jquery.min.js"></script>
    <script src="__STATIC__/admin/js/amazeui.min.js"></script>
    <script src="__STATIC__/admin/js/pintuer.js"></script>
    <script src="__STATIC__/admin/js/app.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/layer/layer.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/laydate/laydate.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/laytpl/laytpl.js"></script>
</head>
<body>
<header class="am-topbar am-topbar-inverse admin-header">
    <div class="am-topbar-brand">
        <a href="javascript:;" class="tpl-logo">
            <img src="__STATIC__/admin/images/logo.png">
        </a>
    </div>
    <div class="am-icon-list tpl-header-nav-hover-ico am-fl am-margin-right"></div>
    <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
    <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
        <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list tpl-header-list">
            <!--<li title="清除缓存">
                <a href="javascript:clear_cache()" class="tpl-header-list-link">
                    清除缓存
                </a>
            </li>-->
            <li title="注销登录">
                <a href="<?php echo url('admin/login/quit'); ?>" class="tpl-header-list-link">
                    <span class="am-icon-sign-out tpl-header-list-ico-out-size"></span>
                </a>
            </li>
        </ul>
    </div>
</header>
<div class="tpl-page-container tpl-page-header-fixed">
    <div class="tpl-left-nav tpl-left-nav-hover" style="margin-left: -10px">
        <div class="tpl-left-nav-title">
            导航列表
        </div>
        <div class="tpl-left-nav-list">
            <ul class="tpl-left-nav-menu">
                <?php foreach($menu_list as $menu): ?>
                    <li class="tpl-left-nav-item">
                        <?php 
                            $b = 0;
                            foreach($menu['child'] as $k => $v){
                                if (strtolower(request()->controller().'/'.request()->action()) == $v['url']){
                                    $b = 1;
                                    break;
                                }
                            }
                           //dump($menu['child']);
                         ?>
                        <a class="nav-link tpl-left-nav-link-list" <?php if($b == 1): ?> class="active" <?php endif; ?>>
                            <i class="<?php echo $menu['icon']; ?>"></i>
                            <span><?php echo $menu['name']; ?></span>
                            <?php if(count($menu['child']) > 0): ?>
                                <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right tpl-left-nav-more-ico-rotate"></i>
                            <?php endif; ?>
                        </a>
                        <?php if(count($menu['child']) > 0): ?>
                            <ul class="tpl-left-nav-sub-menu" style="display:<?php if($b != 1): ?>none<?php else: ?>block<?php endif; ?>;">
                                <li>
                                    <?php foreach($menu['child'] as $menu_child): ?>
                                        <a href="__ROOT__/admin/<?php echo $menu_child['url']; ?>" id="<?php echo request()->controller(); ?>/<?php echo request()->action(); ?>" <?php if(strtolower(request()->controller().'/'.request()->action()) == $menu_child['url']): ?> class="active"<?php endif; ?>>
                                            <i class="am-icon-angle-right"></i>
                                            <span><?php echo $menu_child['name']; ?></span>
                                            <!--<i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>-->
                                        </a>
                                    <?php endforeach; ?>
                                </li>
                            </ul>
                        <?php endif; ?>
                    </li>
                <?php endforeach; ?>
            </ul>
        </div>
    </div>
</div>

<style>
    .am-dropdown{
        width: 100%;
        padding-left: 30px;
        margin-bottom: 10px;
    }
    .am-dropdown div{
        color: #000;
    }
</style>
<div class="tpl-content-wrapper">
<div class="tab">
	<div class="tab-head">
		<strong>支付配置</strong>
		<ul class="tab-nav">
			<li <?php if($tab == ''): ?>class="active"<?php endif; ?> ><a href="#tab-alipay">支付宝支付</a></li>
			<li <?php if($tab == 'wxpay'): ?>class="active"<?php endif; ?> ><a href="#tab-wxpay">微信支付</a></li>
			<!--<li <?php if($tab == 'other'): ?>class="active"<?php endif; ?> ><a href="#tab-other">其他设置</a></li>-->
		</ul>
	</div>
	<div class="tab-body" style="background: #fff">
		<br />
		<div class="tab-panel <?php if($tab == 'alipay' || $tab == ''): ?>active<?php endif; ?>" id="tab-alipay">
			<form method="post" class="form-x" action="?type=alipay">
				<div class="am-dropdown">
					<div class="label">
						<label for="partner">合作者身份ID</label>
					</div>
					<div class="field">
						<input type="text" class="input input-auto" id="partner" name="partner" value="<?php echo $data['partner']; ?>" size="80" placeholder="合作者身份ID" data-validate="required:不可为空" />
					</div>
				</div>
				<div class="am-dropdown">
					<div class="label">
						<label for="seller_id">支付宝账号</label>
					</div>
					<div class="field">
						<input type="text" class="input input-auto" id="seller_id" name="seller_id" value="<?php echo $data['seller_id']; ?>" size="80" placeholder="支付宝账号" data-validate="required:不可为空" />
					</div>
				</div>
				<div class="am-dropdown">
					<div class="label">
						<label for="app_id">APPid</label>
					</div>
					<div class="field">
						<input type="text" class="input input-auto" id="app_id" name="app_id" value="<?php echo $data['app_id']; ?>" size="80" placeholder="开方平台应用ID" data-validate="required:不可为空" />
					</div>
				</div>
				<div class="am-dropdown">
					<div class="label">
						<label>privatekey</label>
					</div>
					<div class="field">
						<textarea name="privatekey" class="input input-auto" rows="15" cols="80" placeholder="（支付宝私钥）去头去尾一串字符串" data-validate="required:不可为空"><?php echo $data['privatekey']; ?></textarea>
					</div>
				</div>
				<div class="am-dropdown">
					<button class="button bg-main" type="submit">提交</button>
				</div>
			</form>
		</div>
		<div class="tab-panel <?php if($tab == 'wxpay'): ?>active<?php endif; ?>" id="tab-wxpay">
			<!--const APaid = '邮件中有,即`公众号APaid`';-->
			<!--const MCHID = '邮件中有,即`微信支付商户号`';-->
			<!--const KEY = 'wxpay.config.php中注释有相关链接';-->
			<!--const APPSECRET = '公众平台开发者中心设置,同样注释中有链接';-->
			<form method="post" class="form-x" action="?tab=wxpay">
				<div class="am-dropdown">
					<div class="label">
						<label for="partner">APPid</label>
					</div>
					<div class="field">
						<input type="text" class="input input-auto" id="appid" name="appid" value="<?php echo $wxdata['appid']; ?>" size="80" placeholder="公众号APPid" required/>
					</div>
				</div>
				<div class="am-dropdown">
					<div class="label">
						<label for="seller_id">MCHID</label>
					</div>
					<div class="field">
						<input type="text" class="input input-auto" id="mchid" name="mchid" value="<?php echo $wxdata['mchid']; ?>" size="80" placeholder="微信支付商户号" data-validate="required:不可为空" />
					</div>
				</div>
				<div class="am-dropdown">
					<div class="label">
						<label for="app_id">KEY</label>
					</div>
					<div class="field">
						<input type="text" class="input input-auto" id="key" name="key" value="<?php echo $wxdata['key']; ?>" size="80" placeholder="商户支付密钥" data-validate="required:不可为空" />
					</div>
				</div>
				<div class="am-dropdown">
					<div class="label">
						<label>APPSECERT</label>
					</div>
					<div class="field">
						<input type="text" class="input input-auto" size="80" id="appsecert" name="appsecret" value="<?php echo $wxdata['appsecret']; ?>" placeholder="公众帐号appsecret" data-validate="required:不可为空"/>
					</div>
				</div>
				<div class="am-dropdown">
					<div class="label">
						<label>apiclient_cert证书</label>
					</div>
					<div class="field">
						<textarea name="apiclient_cert" class="input input-auto" rows="15" cols="80" placeholder="apiclient_cert证书" data-validate="required:不可为空"><?php echo $apiclient_cert; ?></textarea>
					</div>
				</div>
				<div class="am-dropdown">
					<div class="label">
						<label>apiclient_key证书</label>
					</div>
					<div class="field">
						<textarea name="apiclient_key" class="input input-auto" rows="15" cols="80" placeholder="apiclient_key证书" data-validate="required:不可为空"><?php echo $apiclient_key; ?></textarea>
					</div>
				</div>
				<div class="am-dropdown">
					<button class="button bg-main" type="submit">提交</button>
				</div>
			</form>
		</div>
	</div>
	<div class="tab-panel <?php if($tab == 'other'): ?>active<?php endif; ?>" id="tab-other"></div>
</div>
</div>
</div>
<script src="__STATIC__/admin/js/jquery.min.js"></script>
<script src="__STATIC__/admin/js/amazeui.min.js"></script>
<script src="__STATIC__/admin/js/pintuer.js"></script>
<script src="__STATIC__/admin/js/app.js"></script>
<script type="text/javascript" src="__STATIC__/admin/layer/layer.js"></script>
<script type="text/javascript" src="__STATIC__/admin/layer/extend/layer.ext.js"></script>
<script type="text/javascript" src="__STATIC__/admin/laydate/laydate.js"></script>
<script type="text/javascript" src="__STATIC__/admin/laytpl/laytpl.js"></script>
<script>
    $('.upload').on('click',function (){
            var id = $(this).attr('data-id');
            upload(id);
        }
    );
    function upload(id){
        layer.open({
            type:2,
            title:false,
            area: ['70%', '90%'],
            offset: '5%',
            content: "<?php echo url('/admin/material'); ?>?id="+id
        });
    }
</script>
<?php if(request()->isPost()): ?>
<script>
    layer.msg('操作完成！');
    setTimeout(function (){
        parent.window.location.href = parent.window.location.href;
    },800);
</script>
<?php endif; ?>
</body>
</html>